package com.swt.testdemo.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author BleethNie
 * @version 1.0
 * @date 2020/11/11 11:12
 **/
@Data
@ApiModel(value = "后台新增用户表单")
public class AddUserForm {
    @ApiModelProperty(value = "用户名",example = "ad001")
    @NotBlank(message = "用户名不可为空")
    private String username;

    @ApiModelProperty(value = "密码",example = "14e1b600b1fd579f47433b88e8d85291")
    @NotBlank(message = "密码不可为空")
    private String password;

    @ApiModelProperty(value = "地区id",example = "420923")
    @NotBlank(message = "地区id不可为空")
    private String areaId;

    @ApiModelProperty(value = "部门名称",example = "xxx")
    private String deptName;

    @ApiModelProperty(value = "地区权限",example = "420923")
    private String areaPermission;

    @ApiModelProperty(value = "手机号",example = "15485632589")
    private String phone;


    @ApiModelProperty(value = "授权时长",example = "1")
    @NotNull
    @Range(min = 1,max = 100,message = "授权时长指必须在1,100范围内")
    private Integer expireYear;


}
